<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <script type="text/javascript" src="jquery/jquery-1.11.1-min.js"></script>
    <script type="text/javascript" src="jquery/echars/echarts.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $.ajax({
                url:'workbench/chart/transaction/activity/queryCountOfTranGroupByActivity.do',
                type:'post',
                dataType:'json',
                success:function (data){
                    var myEchart=echarts.init(document.getElementById("main"));
                    var option = {
                        title: {
                            text: '交易中市场关联的市场活动数量', //标题
                        },
                        xAxis: {
                            type: 'category',
                            data: data.nameList
                        },
                        yAxis: {
                            type: 'value'
                        },
                        tooltip: {
                            trigger: 'item',
                            formatter: ' {b} : {c}'   //鼠标放在图上显示的标签信息
                        },
                        series: [
                            {
                                data: data.valueList,
                                type: 'bar'
                            }
                        ]
                    };
                    myEchart.setOption(option);
                }
            })


        });
    </script>
</head>
<body>

<div id="main" style="width: 600px;height: 400px"></div>
</body>
</html>
